home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
SystemLogging.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
6KB
|
239 lines
;
; File: SystemLogging.a
;
; Contains: System Logging Service
;
; Version: Technology: 1.0
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__SYSTEMLOGGING__') = 'UNDEFINED' THEN
__SYSTEMLOGGING__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
include 'TextObjects.a'
ENDIF
IF &TYPE('__TIMEOBJECTS__') = 'UNDEFINED' THEN
include 'TimeObjects.a'
ENDIF
IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
include 'AEDataModel.a'
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
IF FOR_PTR_BASED_AE THEN
; Service types
; typedef UInt32 LogID
; typedef UInt32 LogIterator
; Situation Types
; typedef UInt32 LogSituationType
kLogTypeInformation EQU 'info'
kLogTypeWarning EQU 'warn'
kLogTypeFatal EQU 'fatl'
kLogTypeSystemFatal EQU 'sysf'
kLogTypeAll EQU '****'
; System Logging Areas
; typedef UInt32 LogArea
kLogAreaIO EQU 'io '
kLogAreaNetworking EQU 'netw'
kLogAreaKernel EQU 'kern'
kLogAreaApplication EQU 'appl'
kLogAreaBoot EQU 'boot'
kLogAreaPrinting EQU 'prnt'
kLogAreaCommunication EQU 'comm'
kLogAreaServer EQU 'serv'
kLogAreaAll EQU '****'
; Service Version
; typedef UInt32 LogVersion
kLogVersion1 EQU 1
kLogCurrentVersion EQU 1
; Log Message Versions
; typedef UInt32 LogMsgVersion
kLogMsgVersion1 EQU 1
kLogCurrentMsgVersion EQU 1
; Message Flags
; typedef UInt32 LogMsgFlags
kLogMsgFlagsDataTruncated EQU $00000001
kLogMsgFlagsReceivedCorrupted EQU $00000002
kLogMsgFlagsTimeInUptime EQU $00000004
kLogMsgFlagsNotified EQU $00000008
LogMessage RECORD 0
msgSize ds.l 1 ; offset: $0 (0)
msgVersion ds.l 1 ; offset: $4 (4)
msgFlags ds.l 1 ; offset: $8 (8)
msgSituationType ds.l 1 ; offset: $C (12)
msgRepeatedCount ds.l 1 ; offset: $10 (16)
msgArea ds.l 1 ; offset: $14 (20)
msgClient ds.l 1 ; offset: $18 (24)
msgTimestamp ds TimeObject ; offset: $1C (28)
msgDataCount ds.l 1 ; offset: $2C (44)
msgStatus ds.l 1 ; offset: $30 (48)
msgTextSize ds.l 1 ; offset: $34 (52)
sizeof EQU * ; size: $38 (56)
ENDR
; typedef struct LogMessage * LogMessagePtr
kLogMaxMessageSize EQU 1024
; typedef UInt32 LogStatisticsVersion
kLogStatisticsVersion1 EQU 1
kLogStatisticsCurrentVersion EQU 1
; System Logging Statistics
LogStatistics RECORD 0
statsVersion ds.l 1 ; offset: $0 (0)
situationMsgsDropped ds.l 1 ; offset: $4 (4)
situationMsgsTruncated ds.l 1 ; offset: $8 (8)
situationMsgsLoggedThisSession ds.l 1 ; offset: $C (12)
situationMsgsCurrentlyInTheLog ds.l 1 ; offset: $10 (16)
situationMsgsNotified ds.l 1 ; offset: $14 (20)
pluginsInstalled ds.l 1 ; offset: $18 (24)
sizeof EQU * ; size: $1C (28)
ENDR
; Variables and constants for use in the System Notication Service
kSystemLoggingService EQU 'slss'
kLogSNSMsgKind EQU 'slsm'
kLogSNSMsgSubjectSize EQU 12
; Basic Logging routine
;
; extern OSStatus LogSituation(LogSituationType situationType, LogArea situationArea, OSType situationClient, TextObject situationText, OSStatus situationStatus, AEStream situationData)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogSituation
ENDIF
; System Logging Service Administration APIs
;
; extern OSStatus LogOpen(LogID *theService, TextObject clientName)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogOpen
ENDIF
;
; extern OSStatus LogClose(LogID theService)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogClose
ENDIF
;
; extern OSStatus LogGetClientName(TextObject clientName)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogGetClientName
ENDIF
;
; extern OSStatus LogClear(LogID theService)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogClear
ENDIF
;
; extern OSStatus LogFlush(LogID theService)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogFlush
ENDIF
;
; extern OSStatus LogGetCommAreaSize(LogID theService, ByteCount *size)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogGetCommAreaSize
ENDIF
;
; extern OSStatus LogSetCommAreaSize(LogID theService, ByteCount size)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogSetCommAreaSize
ENDIF
;
; extern OSStatus LogCreateIterator(LogID theService, LogIterator *iterator)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogCreateIterator
ENDIF
;
; extern OSStatus LogGetEntry(LogIterator iterator, LogMsgVersion version, LogMessage *msg)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogGetEntry
ENDIF
;
; extern OSStatus LogDisposeIterator(LogIterator iterator)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogDisposeIterator
ENDIF
;
; extern OSStatus LogExtractText(LogMessage *entry, TextObject text)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogExtractText
ENDIF
;
; extern OSStatus LogExtractAEDesc(LogMessage *entry, AEDesc *desc)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogExtractAEDesc
ENDIF
;
; extern OSStatus LogGetStatistics(LogID theService, LogStatisticsVersion version, LogStatistics *statistics)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogGetStatistics
ENDIF
;
; extern OSStatus LogGetLogSize(LogID theService, ByteCount *maxSize)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogGetLogSize
ENDIF
;
; extern OSStatus LogSetLogSize(LogID theService, ByteCount maxSize)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION LogSetLogSize
ENDIF
ENDIF
ENDIF
ENDIF ; __SYSTEMLOGGING__